package com.jxmcloud.business.cut.service.impl.app.activity;

import com.jxmcloud.business.cut.dto.client.AddUserActivityInfoDto;
import com.jxmcloud.business.cut.dto.client.SelectUserActivityInfoDto;
import com.jxmcloud.business.cut.dto.client.UpdateUserActivityInfoDto;
import com.jxmcloud.business.cut.service.app.activity.IUserActivityInfoService;
import com.jxmcloud.business.cut.service.database.IUserActivityInfoDBService;
import com.jxmcloud.business.cut.vo.client.AddUserActivityInfoVo;
import com.jxmcloud.business.cut.vo.client.SelectUserActivityInfoVo;
import com.jxmcloud.business.cut.vo.client.UpdateUserActivityInfoVo;
import com.jxmcloud.business.cut.vo.user.PlayerInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class UserActivityInfoServiceImpl implements IUserActivityInfoService {
    @Resource
    private IUserActivityInfoDBService userActivityInfoDBService;

    //
    @Override
    public AddUserActivityInfoVo addUserActivityInfo(AddUserActivityInfoDto dto, PlayerInfoVo player) {
        /*String error = CutErrorMsg.ERROR_FALSE;
        AddUserActivityInfoVo result = new AddUserActivityInfoVo();
        do {
            Boolean isOk = userActivityInfoDBService.addUserActivityInfo(dto, player);
            if (!isOk) {
                log.error("添加用户活动信息失败");
                break;
            }
            error = CutErrorMsg.ERROR_TRUE;
        } while (false);
        if (!error.equals(CutErrorMsg.ERROR_TRUE)) {
            // 抛出异常
            throw new BusinessException(error);
        }
        return result;*/
        return null;
    }

    // 
    @Override
    public SelectUserActivityInfoVo selectUserActivityInfo(SelectUserActivityInfoDto dto, PlayerInfoVo player) {
        /*String error = CutErrorMsg.ERROR_FALSE;
        SelectUserActivityInfoVo result = new SelectUserActivityInfoVo();
        do {
            UserActivityInfoVo info = userActivityInfoDBService.selectUserActivityInfo(dto, player);
            if (info == null) {
                log.error("用户活动信息不存在");
                break;
            }
            result.setInfo(info);
            error = CutErrorMsg.ERROR_TRUE;
        } while (false);
        if (!error.equals(CutErrorMsg.ERROR_TRUE)) {
            // 抛出异常
            throw new BusinessException(error);
        }
        return result;*/
        return null;
    }

    // 
    @Override
    public UpdateUserActivityInfoVo updateUserActivityInfo(UpdateUserActivityInfoDto dto, PlayerInfoVo player) {
        /*String error = CutErrorMsg.ERROR_FALSE;
        UpdateUserActivityInfoVo result = new UpdateUserActivityInfoVo();
        do {
            // todo


            error = CutErrorMsg.ERROR_TRUE;
        } while (false);
        if (!error.equals(CutErrorMsg.ERROR_TRUE)) {
            // 抛出异常
            throw new BusinessException(error);
        }
        return result;*/
        return null;
    }
}
